# -*- coding: utf-8 -*-

'''
Created on Apr 13, 2010

@author: Krzysztof Langner
'''

from sympy import sympify
from worksheet import Worksheet


def simplest_form_worksheet(input):

    ws = Worksheet();
    ws.add(Worksheet.TYPE_PROMPT, "Sprowadź do najprostszej postaci wyrażenie:")
    ws.add(Worksheet.TYPE_COMMENT, input)
    
    exp = sympify(input)
    
    ws.add(Worksheet.TYPE_COMMENT, "Dodajemy wspólne składniki")
    ws.add(Worksheet.TYPE_EXPRESSION, exp)
    
    ws.add(Worksheet.TYPE_COMMENT, "Czyli najprostsza postać to:")
    ws.add(Worksheet.TYPE_EXPRESSION, exp)
    
    return ws

